check file selected in php

35

if(!isset($_FILES['file_upload']) || $_FILES['file_upload']['error'] == UPLOAD_ERR_NO_FILE) {
    echo "Error no file selected"; 
} else {
    print_r($_FILES);
}

Comments

Submit
0 Comments